import request from '@/utils/request'

// 查询商品折扣券列表
export function listMallVoucher(query) {
  return request({
    url: '/mall/mallVoucher/list',
    method: 'get',
    params: query
  })
}

// 查询商品折扣券详细
export function getMallVoucher(id) {
  return request({
    url: '/mall/mallVoucher/' + id,
    method: 'get'
  })
}

// 新增商品折扣券
export function addMallVoucher(data) {
  return request({
    url: '/mall/mallVoucher',
    method: 'post',
    data: data
  })
}

// 修改商品折扣券
export function updateMallVoucher(data) {
  return request({
    url: '/mall/mallVoucher',
    method: 'put',
    data: data
  })
}

// 删除商品折扣券
export function delMallVoucher(id) {
  return request({
    url: '/mall/mallVoucher/' + id,
    method: 'delete'
  })
}
